//
//  JQMineProfileCell.m
//  JQLive
//
//  Created by Bruce on 2020/8/18.
//  Copyright © 2020 mlkq. All rights reserved.
//

#import "JQMineProfileCell.h"
@interface  JQMineProfileCell()
@property (nonatomic, strong) UILabel *cellLb;
@property (nonatomic, strong) UILabel *cellDetailLb;

@end

@implementation JQMineProfileCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
- (void)initView{
    UIView *cellBackgroundV = [[UIView alloc] init];//WithFrame:CGRectMake(10, 0, SCREEN_WIDTH-20, 48)];
    [self.contentView addSubview:cellBackgroundV];
    MY_WEAK;
    [cellBackgroundV mas_makeConstraints:^(MASConstraintMaker *make) {
        MY_STRONG;
        make.left.mas_equalTo(strongSelf.mas_left).offset(10);
        make.right.mas_equalTo(strongSelf.mas_right).offset(-10);
        make.top.bottom.equalTo(strongSelf);
    }];
    cellBackgroundV.backgroundColor = [UIColor whiteColor];
//    self.backgroundColor = kColorWithHex(0xF2F4FC);
    self.cellBackgroundV = cellBackgroundV;
   
    UILabel *cellLb = [[UILabel alloc] init];
    [cellBackgroundV addSubview:cellLb];
    self.cellLb = cellLb;
    [cellLb mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(cellBackgroundV.mas_left).offset(18);
        make.centerY.equalTo(cellBackgroundV);
    }];
    cellLb.textColor = MYColor3;
    cellLb.font = [UIFont systemFontOfSize:14];
    
    UIImageView *cellRightArrowImageV = [[UIImageView alloc] initWithImage:[UIImage svgImageNamed:@"mine_rightArrow" size:CGSizeMake(7, 10)]];
    [cellBackgroundV addSubview:cellRightArrowImageV];
    
    [cellRightArrowImageV mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.mas_equalTo(cellBackgroundV.mas_right).offset(-17);
        make.centerY.equalTo(cellBackgroundV);
        make.size.mas_equalTo(CGSizeMake(7, 10));
    }];
    
    UILabel *cellDetailLb = [[UILabel alloc] init];
    [cellBackgroundV addSubview:cellDetailLb];
    self.cellDetailLb = cellDetailLb;
    [cellDetailLb mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.mas_equalTo(cellRightArrowImageV.mas_left).offset(-10);
        make.centerY.equalTo(cellBackgroundV);
    }];
    cellDetailLb.textColor = MYColor9;
    cellDetailLb.font = [UIFont systemFontOfSize:14];
    cellDetailLb.textAlignment = NSTextAlignmentRight;
    cellDetailLb.hidden = YES;
}

- (void)setCellLb:(NSString *)cellLbStr cellDetailLb:(NSString *)cellDetailStr{
    self.cellLb.text = cellLbStr;
    self.cellDetailLb.hidden = !cellDetailStr.length;
    self.cellDetailLb.text = cellDetailStr;
}


@end
